Conversation
Tag pushes set GITHUB_REF to refs/tags/..., which makes sdk-generation-action derive an invalid GitHub PR base. Add a tag-triggered dispatch workflow that starts sdk-generate-on-release.yml via workflow_dispatch with ref main, and pass the tag as release_tag for v1.0.0 SDK version overrides. Update contributing/release.md and contributing/sdks.md for the two-step flow. Made-with: Cursor
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
There was a problem hiding this comment.
Pull request overview
This PR adjusts the tag-based SDK generation pipeline so SDK regen runs against the tagged release commit (rather than main tip) while still creating SDK PRs targeting main.
Changes:
- Dispatches
sdk-generate-on-release.ymlusingref: <tag>to ensure checkout matches the release commit. - Vendors Speakeasy’s v15 workflow executor and adds a
pr_base_is_mainswitch to force PR base tomainwithout changing checkout ref. - Updates release/SDK docs to reflect the two-step dispatch flow and tag-ref requirement.
Reviewed changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
.github/workflows/sdk-generate-on-release-dispatch.yml |
New tag-push dispatcher that triggers SDK generation at the tag ref. |
.github/workflows/sdk-generate-on-release.yml |
Moves to workflow_dispatch only; adds guard job ensuring ref matches release_tag; passes pr_base_is_main: true. |
.github/workflows/sdk-generate-one.yml |
Adds pr_base_is_main input and switches to using the vendored executor workflow. |
.github/workflows/speakeasy-workflow-executor-v15.yml |
Adds vendored Speakeasy executor with patches for PR base override + checkout ref pinning. |
contributing/release.md |
Documents updated release workflow behavior (dispatch + tag-ref execution). |
contributing/sdks.md |
Documents tag-based SDK generation as a two-step dispatch using the vendored executor. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| openapi_doc_auth_token: ${{ secrets.openapi_doc_auth_token }} | ||
| target: ${{ inputs.target }} | ||
| registry_tags: ${{ inputs.registry_tags }} | ||
| push_code_samples_only: ${{ inputs.push_code_samples }} |
There was a problem hiding this comment.
push_code_samples_only is wired to ${{ inputs.push_code_samples }}, but the declared input is push_code_samples_only. This prevents callers from setting the flag (it will always be empty). Update the expression to use inputs.push_code_samples_only (or rename the input consistently if upstream expects a different name).
| push_code_samples_only: ${{ inputs.push_code_samples }} | |
| push_code_samples_only: ${{ inputs.push_code_samples_only }} |
| speakeasy_api_key: ${{ secrets.speakeasy_api_key }} | ||
| pr_creation_pat: ${{ secrets.pr_creation_pat }} | ||
| output_tests: ${{ inputs.output_tests }} | ||
| speakeasy_server_url: ${{ inputs.speakeasy_server_url }} | ||
| working_directory: ${{ inputs.working_directory }} |
There was a problem hiding this comment.
output_tests is passed to the Speakeasy action via ${{ inputs.output_tests }}, but this reusable workflow does not declare an output_tests input. This makes the parameter always null/empty and is confusing/fragile. Either add output_tests to on.workflow_call.inputs (with the intended type/default) or remove this with: entry if it’s not supported/needed here.
…784 Made-with: Cursor
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 6 out of 6 changed files in this pull request and generated 2 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| # Vendored from speakeasy-api/sdk-generation-action (.github/workflows/workflow-executor.yaml, tag v15). | ||
| # Outpost patch: workflow_call input `pr_base_is_main` and job `env` on `run-workflow` so Speakeasy’s | ||
| # Go code sees GITHUB_REF=refs/heads/main for PR base while actions/checkout still uses the workflow ref (tag). | ||
| # When upgrading Speakeasy, re-copy this file from upstream and re-apply the two marked patches. |
There was a problem hiding this comment.
File header says there are "two marked patches", but this vendored workflow currently contains three Outpost patches (workflow_call input, job env override, and explicit checkout ref). Update the header to match so future re-vendoring doesn’t miss a required patch.
| # When upgrading Speakeasy, re-copy this file from upstream and re-apply the two marked patches. | |
| # When upgrading Speakeasy, re-copy this file from upstream and re-apply the three marked patches. |
| type: string | ||
| signed_commits: | ||
| required: false | ||
| description: "This will set commits to be signed and and verified" |
There was a problem hiding this comment.
Typo in the signed_commits input description: "signed and and verified" has a duplicated "and".
| description: "This will set commits to be signed and and verified" | |
| description: "This will set commits to be signed and verified" |
Made-with: Cursor
Summary
Follow-up to #784 (merged). The previous approach dispatched with
ref: main, which meant SDK generation ran againstmain's tip rather than the tagged release commit.This PR:
ref: <tag>so the workflow checks out the exact release commit.speakeasy-workflow-executor-v15.yml(copy of Speakeasy'sworkflow-executor.yaml@ v15) with two marked patches:pr_base_is_maininput + job-levelenvoverride so Speakeasy's Go code seesGITHUB_REF=refs/heads/mainfor PR creation.ref: ${{ github.ref }}on the checkout step so the env override doesn't redirect checkout away from the tag.ensure-release-ref-is-tag) fails fast if the workflow ref doesn't match therelease_taginput.contributing/release.mdandcontributing/sdks.md.Files changed
sdk-generate-on-release-dispatch.ymlref: tag(wasref: main)sdk-generate-on-release.ymlrelease_tagrequired; guard job;pr_base_is_main: truesdk-generate-one.ymlpr_base_is_maininput; uses vendored executorspeakeasy-workflow-executor-v15.ymlcontributing/release.mdcontributing/sdks.mdNote on existing tags
For releases already tagged (e.g.
v0.15.0), the tag's commit doesn't contain these workflow files, so automatic dispatch won't work. Use the individual per-language workflows (Generate OUTPOST-GO, etc.) frommaininstead.Test plan
v0.0.0-sdk-gen-test) frommainafter mergesdk-generate-on-release.ymlmainpr_base_is_main= unchanged behavior)Made with Cursor